import request from '@/utils/request'
import { baseUrl } from '/env'

export function listRoleAccessByParentApi(params) {
  return request({
    url: baseUrl + '/sysAccess/listRoleAccessByParent',
    method: 'get',
    params
  })
}
export function treeRoleAccessApi(menuType) {
  return request({
    url: baseUrl + '/sysAccess/treeRoleAccess?menuType='+menuType,
    method: 'get'
  })
}
export function getAccessIdsByRoleApi(params) {
  return request({
    url: baseUrl + '/sysAccess/getAccessIdsByRole',
    method: 'get',
    params
  })
}
export function saveOrUpdateApi(data) {
  return request({
    url: baseUrl + '/sysAccess/saveOrUpdate',
    method: 'post',
    data
  })
}
export function deleteApi(params) {
  return request({
    url: baseUrl + '/sysAccess/delete',
    method: 'delete',
    params
  })
}

